package com.hh.erp.controller;

import com.hh.erp.entity.SysDept;
import com.hh.erp.service.SysDeptService;
import com.hh.erp.util.http.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private SysDeptService deptService;

    @GetMapping("/deptTree")
    public AjaxResult deptTree() {
        return AjaxResult.success(deptService.selectDeptTreeList());
    }
}
